#include <iostream>
#include "opencv_undistort.h"


int main(int argc, char** argv) {
    spdlog::set_level(spdlog::level::debug);

    if (argc != 3) {
        spdlog::error("Incorrect, to use this program, the command should like this: ./undistort <inputImagePath> <outputImagePath>");
        return 0;
    }
    std::string path = R"(/mnt/e/workspace-clion/undistort/resources/camera_parameters.yaml)";
    casia::OpencvUnDistort unDistort(path);
    unDistort.loadImage(std::string(argv[1]));
//    unDistort.showOriginImage();
    unDistort.UnDistort();
    unDistort.saveUnDistort(std::string(argv[2]));
    return 0;
}
